const mongoose = require('mongoose')
const Schema = mongoose.Schema
const carouselSchema = new Schema(
  {
    title: {
      type: String,
      required: true
    },
    picture: {
      type: String,
      required: true
    },
    linkAddress: {
      type: String
    },
    isShow: {
      type: Boolean,
      default: true
    },
    remark: {
      type: String
    },
    creatTime: {
      type: String
    },
    updateTime: {
      type: String,
      default: Date.now
    }
  },
  { collection: 'carouser', versionKey: false }
)
const carouselModel = mongoose.model('carouser', carouselSchema)
module.exports = carouselModel
